﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace WebDesign
{
    public partial class Manegment : System.Web.UI.Page
    {
        SqlClass scc = new SqlClass();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {

                    string id = Session["usersession"].ToString();
                    lblId.Text = scc.checkCommand("select EmployeeId from Employeetbl,Logintbl where Logintbl.UserName=Employeetbl.EmployeeId and LoginId='" + id + "'");
                    lblFamily.Text = scc.checkCommand("select EmployeeFamily from Employeetbl,Logintbl where Logintbl.UserName=Employeetbl.EmployeeId and LoginId='" + id + "'");
                    lblName.Text = scc.checkCommand("select EmployeeName from Employeetbl,Logintbl where Logintbl.UserName=Employeetbl.EmployeeId and LoginId='" + id + "'");
                    string pass = scc.checkCommand("select EmployeeNumNationalId from Employeetbl,Logintbl where Logintbl.UserName=Employeetbl.EmployeeId and LoginId='" + id + "'");
                  //  string password = FormsAuthentication.HashPasswordForStoringInConfigFile(pass, "md5");
                }
                catch (Exception)
                {
                   Response.Redirect("Default.aspx");
                }
            }

        }
    }
}